package com.niiwoo.civet.user.service.local;

import cn.jiguang.common.resp.APIConnectionException;
import cn.jiguang.common.resp.APIRequestException;

import com.niiwoo.civet.user.dao.entity.NoticeMessage;
import com.niiwoo.civet.user.dao.mapper.NoticeMessageMapperExt;
import com.niiwoo.tripod.push.configuration.TripodPushConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.Map;

/**
 * 站内信与极光推送服务
 * @author xueyuke
 * @since 2017-12-15
 */
@Service
public class NoticeMessageService{

    private final static Logger logger = LoggerFactory.getLogger(NoticeMessageService.class);

    @Autowired
    TripodPushConfiguration tripodPushConfiguration;

    @Autowired
    private NoticeMessageMapperExt noticeMessageMapperExt;
    
    @Transactional
    public void sendNotice(Integer msgId) {
//        tripodPushConfiguration.jpushClients().send

    }
    
    public NoticeMessage getNewestNoticeMessage(String mobileNo) {
    	return noticeMessageMapperExt.selectNewestNoticeMessage(mobileNo);
    }
}